package cn.zwx.common.captcha.config;

import cn.zwx.common.captcha.enums.CaptchaCategory;
import cn.zwx.common.captcha.enums.CaptchaType;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * 验证码 配置属性
 *
 * @author zhangwenxue
 */
@Data
@ConfigurationProperties(prefix = "cn.zwx.captcha")
public class CaptchaProperties {

    public static final int WIDTH = 160;
    public static final int HEIGHT = 60;

    /**
     * 验证码类型
     */
    private CaptchaType type;

    /**
     * 验证码类别
     */
    private CaptchaCategory category;

    /**
     * 数字验证码位数
     */
    private Integer numberLength;

    /**
     * 字符验证码长度
     */
    private Integer charLength;

    /**
     * 验证码图片宽度
     */
    private Integer width = WIDTH;
    /**
     * 验证码图片长度
     */
    private Integer height = HEIGHT;
    /**
     * 验证码背景颜色
     */
    private String background = "pink";
}
